﻿<!DOCTYPE html>
<html>

<head>
	<meta charset=utf-8>
	<title>Multithreading</title>
	<link href="../base.css" rel="stylesheet" type="text/css" />
</head>

<body>
	<div class="main">
		<h1>Multithreading</h1>
		
		<h2>Overview</h2>
		<p>
In Effekseer, "Effekseer::Manager::Update" only can be executed in other thread.
While updating effects, you can create effects, move effects, and so on.
		</p>

		<h2>Flip</h2>
		<p>
The sample is "RuntimeSample/Multithread.sln"
		</p>
		<p>
Flip must be done manually in order to support multi-threading.
I set false to autoFlip of "::Effekseer::Manager::Create" argument. 
Flip is done manually.
		</p>

    <p>
You need to execute "Effekseer::Manager::Flip" before "Effekseer::Manager::Update".
Effects existing at the time of executing this function are subject to updating and drawing.
After that, you can run "Effekseer::Manager::Update" in other thread.
    </p>

<pre>
<code>
// Create an instance of effect manager (flip is not done automatically)
g_manager = ::Effekseer::Manager::Create( 2000, false );

// Flip manager
g_manager->Flip();

// Start executing "Effekseer::Manager::Update" in other thread

// Create effects, move effects and so on.

// Wait to finish "Effekseer::Manager::Update"

// Render effects

</code>
</pre>

	</div>
</body>

</html>